from __clrclasses__.System import Array as _n_0_t_0
from __clrclasses__.System import LocalDataStoreSlot as _n_0_t_1
from __clrclasses__.System import ContextBoundObject as _n_0_t_2
from __clrclasses__.System import Attribute as _n_0_t_3
from __clrclasses__.System import MulticastDelegate as _n_0_t_4
from __clrclasses__.System import ICloneable as _n_0_t_5
from __clrclasses__.System import IntPtr as _n_0_t_6
from __clrclasses__.System import IAsyncResult as _n_0_t_7
from __clrclasses__.System import AsyncCallback as _n_0_t_8
from __clrclasses__.System import MarshalByRefObject as _n_0_t_9
from __clrclasses__.System.Runtime.InteropServices import _Attribute as _n_1_t_0
from __clrclasses__.System.Runtime.Remoting.Activation import IConstructionCallMessage as _n_2_t_0
from __clrclasses__.System.Runtime.Remoting.Activation import IConstructionReturnMessage as _n_2_t_1
from __clrclasses__.System.Runtime.Remoting.Messaging import IMessageSink as _n_3_t_0
from __clrclasses__.System.Runtime.Remoting.Messaging import IMessage as _n_3_t_1
from __clrclasses__.System.Runtime.Serialization import ISerializable as _n_4_t_0
import typing
class Context(object):
    @property
    def ContextID(self) -> int:"""ContextID { get; } -> int"""
    @property
    def ContextProperties(self) -> _n_0_t_0[IContextProperty]:"""ContextProperties { get; } -> Array"""
    @property
    def DefaultContext(self) -> Context:"""DefaultContext { get; } -> Context"""
    def __init__(self) -> Context:...
    @staticmethod
    def AllocateDataSlot() -> _n_0_t_1:...
    @staticmethod
    def AllocateNamedDataSlot(name: str) -> _n_0_t_1:...
    def DoCallBack(self, deleg: CrossContextDelegate):...
    @staticmethod
    def FreeNamedDataSlot(name: str):...
    def Freeze(self):...
    @staticmethod
    def GetData(slot: _n_0_t_1) -> object:...
    @staticmethod
    def GetNamedDataSlot(name: str) -> _n_0_t_1:...
    def GetProperty(self, name: str) -> IContextProperty:...
    @staticmethod
    def RegisterDynamicProperty(prop: IDynamicProperty, obj: _n_0_t_2, ctx: Context) -> bool:...
    @staticmethod
    def SetData(slot: _n_0_t_1, data: object):...
    def SetProperty(self, prop: IContextProperty):...
    @staticmethod
    def UnregisterDynamicProperty(name: str, obj: _n_0_t_2, ctx: Context) -> bool:...
class ContextAttribute(_n_0_t_3, _n_1_t_0, IContextAttribute, IContextProperty):
    def __init__(self, name: str) -> ContextAttribute:...
class ContextProperty(object):
    @property
    def Name(self) -> str:"""Name { get; } -> str"""
    @property
    def Property(self) -> object:"""Property { get; } -> object"""
class CrossContextDelegate(_n_0_t_4, _n_0_t_5, _n_4_t_0):
    def __init__(self, object: object, method: _n_0_t_6) -> CrossContextDelegate:...
    def BeginInvoke(self, callback: _n_0_t_8, object: object) -> _n_0_t_7:...
    def EndInvoke(self, result: _n_0_t_7):...
    def Invoke(self):...
class IContextAttribute():
    def GetPropertiesForNewContext(self, msg: _n_2_t_0):...
    def IsContextOK(self, ctx: Context, msg: _n_2_t_0) -> bool:...
class IContextProperty():
    @property
    def Name(self) -> str:"""Name { get; } -> str"""
    def Freeze(self, newContext: Context):...
    def IsNewContextOK(self, newCtx: Context) -> bool:...
class IContextPropertyActivator():
    def CollectFromClientContext(self, msg: _n_2_t_0):...
    def CollectFromServerContext(self, msg: _n_2_t_1):...
    def DeliverClientContextToServerContext(self, msg: _n_2_t_0) -> bool:...
    def DeliverServerContextToClientContext(self, msg: _n_2_t_1) -> bool:...
    def IsOKToActivate(self, msg: _n_2_t_0) -> bool:...
class IContributeClientContextSink():
    def GetClientContextSink(self, nextSink: _n_3_t_0) -> _n_3_t_0:...
class IContributeDynamicSink():
    def GetDynamicSink(self) -> IDynamicMessageSink:...
class IContributeEnvoySink():
    def GetEnvoySink(self, obj: _n_0_t_9, nextSink: _n_3_t_0) -> _n_3_t_0:...
class IContributeObjectSink():
    def GetObjectSink(self, obj: _n_0_t_9, nextSink: _n_3_t_0) -> _n_3_t_0:...
class IContributeServerContextSink():
    def GetServerContextSink(self, nextSink: _n_3_t_0) -> _n_3_t_0:...
class IDynamicMessageSink():
    def ProcessMessageFinish(self, replyMsg: _n_3_t_1, bCliSide: bool, bAsync: bool):...
    def ProcessMessageStart(self, reqMsg: _n_3_t_1, bCliSide: bool, bAsync: bool):...
class IDynamicProperty():
    @property
    def Name(self) -> str:"""Name { get; } -> str"""
class SynchronizationAttribute(ContextAttribute, _n_1_t_0, IContextAttribute, IContextProperty, IContributeServerContextSink, IContributeClientContextSink):
    NOT_SUPPORTED: int
    REQUIRED: int
    REQUIRES_NEW: int
    SUPPORTED: int
    @property
    def IsReEntrant(self) -> bool:"""IsReEntrant { get; } -> bool"""
    @property
    def Locked(self) -> bool:"""Locked { get; set; } -> bool"""
    def __init__(self, flag: int, reEntrant: bool) -> SynchronizationAttribute:...
    def __init__(self, flag: int) -> SynchronizationAttribute:...
    def __init__(self, reEntrant: bool) -> SynchronizationAttribute:...
    def __init__(self) -> SynchronizationAttribute:...
